<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="${pageContext.request.contextPath}/student/toAddStudent">新增用户 </a>
<table border="1" width="400" align="center" cellpadding="0" cellspacing="0">
    <caption><h1>用户管理</h1></caption>
    <tr>
        <td>编号</td>
        <td>用户名</td>
        <td>年龄</td>
        <td>操作</td>
    </tr>

    <c:forEach items="${all}" var="stu">
        <tr>
            <td>${user.id}</td>
            <td>${user.name}</td>
            <td>${user.age}</td>
            <td>
                <a href="${pageContext.request.contextPath}/student/toUpdateStudent?id=${stu.id}">修改</a>
                <a href="${pageContext.request.contextPath}/student/deleteStudent?id=${stu.id}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<c:forEach begin="1" end="${pages}" varStatus="vs">
        <a href="/student/list?page=${vs.count}&size=2" style="border: 1px solid red;" >${vs.count}</a>&nbsp;&nbsp;&nbsp;&nbsp;
</c:forEach>

</body>
</html>
